Height detection apparatus and coating apparatus equipped with the same

ABSTRACT

A height detection apparatus successively changes the brightness of white light from a first level to a second level in accordance with a position of a Z stage and captures an image of interference light while moving a two-beam interference objective lens relative to a paste film in an optical axis direction, detects, as a focus position, a position of the Z stage where the intensity of interference light is highest in a period during which the brightness of white light is set to the first or second level, for each pixel of the captured image, and obtains the height of the paste film based on a detection result.

TECHNICAL FIELD

The present invention relates to a height detection apparatus and acoating apparatus equipped with the same, and more specifically to aheight detection apparatus that detects the height of a target object.More specifically, the present invention relates to a height detectionapparatus for inspecting the shapes of metal, resin, and workpiecesthereof or inspecting the shapes of substrate surfaces of semiconductorsubstrates, printed circuit boards, and flat panel displays.

BACKGROUND ART

Japanese Patent Laying-Open No. 2015-7564 (PTD 1) discloses a heightdetection method including: positioning a two-beam interferenceobjective lens above an ink-coated portion formed of ink applied on asurface of a substrate; thereafter capturing an image of interferencelight while moving a Z stage; obtaining the position of the Z stagewhere the contrast value reaches a peak for each of a plurality ofpixels forming the captured image; and obtaining the height of theink-coated portion based on the obtained position of the Z stage.

CITATION LIST Patent Document PTD 1: Japanese Patent Laying-Open No.2015-7564 PTD 2: Japanese Patent Laying-Open No. 2007-268354 SUMMARY OFINVENTION Technical Problem

However, when the relative height of a paste film (target object) isdetected with reference to the height of a metal film (see FIG. 8), forexample, the following problem may arise. When the particle size in themetal film is as small as a few nm to a few tens of nm, the surface issmooth, regular reflected light is easily obtained, and the intensity ofinterference light is high. By contrast, when the particle size of thematerial included in the paste is large, the reflected light scattersdue to surface roughness, and the intensity of interference light islow.

In such a case, the intensity of interference light greatly differsbetween the metal film and the paste film. When the brightness of whitelight is increased in order to increase the intensity of interferencelight corresponding to the paste film, the intensity of interferencelight corresponding to the metal film becomes so high that thebrightness of the image of the interference light may be saturated. Inthe state in which the brightness of the image is saturated, it isimpossible to accurately detect the peak of the contrast value, and itis impossible to accurately detect the height of the paste film withreference to the surface of the metal film.

Therefore, a main object of the present invention is to provide a heightdetection apparatus capable of accurately detecting the height of atarget object.

Solution to Problem

A height detection apparatus according to the present invention detectsthe height of a target object. The height detection apparatus includes:a light source configured to emit white light; a two-beam interferenceobjective lens configured to divide white light emitted from the lightsource into two light beams, apply one of the two light beams to thetarget object and the other light beam to a reference surface, and causeinterference between reflected light from the target object andreflected light from the reference surface to obtain interference light;an imaging device configured to capture an image of interference lightobtained by the two-beam interference objective lens; a Z stageconfigured to move the two-beam interference objective lens relative tothe target object in an optical axis direction; and a control deviceconfigured to control the light source, the imaging device, and the Zstage to obtain a height of the target object. The control devicesuccessively changes brightness of the white light in first to K-thlevels in accordance with a position of the Z stage and captures animage of the interference light while moving the two-beam interferenceobjective lens relative to the target object in the optical axisdirection, detects, as a focus position, a position of the Z stage whereintensity of the interference light is highest in a period during whichthe brightness of the white light is set to the k-th level, for eachpixel of the captured image, and obtains the height of the target objectbased on a detection result, where K is an integer equal to or greaterthan two, and k is any integer from 1 to K.

Advantageous Effects of Invention

The height detection apparatus according to the present inventionsuccessively changes the brightness of white light in first to K-thlevels in accordance with the position of the Z stage and captures animage of interference light while moving the two-beam interferenceobjective lens relative to the target object in the optical axisdirection, detects, as a focus position, the position of the Z stagewhere the intensity of interference light is highest in a period duringwhich the brightness of white light is set to the k-th level, for eachpixel of the captured image, and obtains the height of the target objectbased on the detection result. Since the level of the brightness ofwhite light is set in accordance with the properties of the targetobject and the vicinity thereof, the height of the target object can bedetected accurately.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating a configuration of a heightdetection apparatus according to an embodiment of the present invention.

FIG. 2 is a diagram illustrating a configuration of a two-beaminterference objective lens illustrated in FIG. 1.

FIG. 3 is a diagram illustrating the layout of optical elementsincluding the two-beam interference objective lens and an observationoptical system illustrated in FIG. 1.

FIG. 4 is a diagram illustrating the relation between the position of Zstage 7 illustrated in FIG. 3 and the intensity of interference light.

FIG. 5 is a block diagram illustrating a configuration of a controldevice illustrated in FIG. 1.

FIG. 6 is a flowchart illustrating the operation of the control deviceillustrated in FIG. 5.

FIG. 7 is a diagram illustrating a command value correspondence table.

FIG. 8 is a diagram illustrating a configuration of a work.

FIG. 9 is a diagram illustrating the relation between the position ofthe Z stage and the luminance of interference light.

FIG. 10 is a diagram illustrating a position command value array and anillumination command value array.

FIG. 11 is a diagram for explaining a method of detecting a focusposition.

FIG. 12 is a perspective view illustrating an overall configuration of acoating apparatus equipped with the height detection apparatus accordingto the present embodiment.

FIG. 13 is a perspective view illustrating a main part of theobservation optical system and the coating mechanism.

FIG. 14 is a diagram illustrating the main part as viewed from directionA in FIG. 13.

FIG. 15 is a diagram for explaining the detail of a coating operation.

FIG. 16 is a diagram for explaining behavior of paste during coatingstandby.

FIG. 17 is a diagram illustrating an example of the relation between thecoating standby time and the amount of coating.

FIG. 18 is a diagram illustrating an example of the relation between thecontact time of the coating needle and the amount of coating.

FIG. 19 is a diagram for explaining pushing of the coating needle duringcoating operation.

FIG. 20 is a diagram illustrating an example of the relation between theamount of push of the coating needle and the amount of coating.

FIG. 21 is a diagram of a coating region as viewed from above.

FIG. 22 is a flowchart illustrating the process of applying paste andadjusting the amount of coating executed in the coating apparatus.

DESCRIPTION OF EMBODIMENTS

[Configuration of Height Detection Apparatus]

FIG. 1 is a block diagram illustrating a configuration of a heightdetection apparatus 1 according to an embodiment of the presentinvention. In FIG. 1, this height detection apparatus 1 includes a lightsource 2, a light source controller 3, a two-beam interference objectivelens 4, an observation optical system 5, an imaging device 6, a Z stage7, a Z stage controller 8, a support member 9, a base plate 10, acontrol device 11, a keyboard 12, a mouse 13, and a monitor 14.Observation optical system 5 is fixed to base plate 10 with supportmember 9 interposed. A flat plate-shaped work 15 is mounted on a surfaceof base plate 10. Height detection apparatus 1 detects the height of atarget object on the surface of work 15 (see FIG. 8).

Light source 2 is provided on a side surface of observation opticalsystem 5 to emit white light. Light source controller 3 is connected tolight source 2 to control the brightness of white light in accordancewith an illumination command value array (second command value array)from control device 11. Light source controller 3 controls thebrightness of white light, for example, by controlling current suppliedto light source 2. White light emitted from light source 2 enterstwo-beam interference objective lens 4 through observation opticalsystem 5.

Two-beam interference objective lens 4 is provided at a lower end ofobservation optical system 5 with Z stage 7 interposed to divide whitelight from light source 2 into two light beams. One of the light beamsis applied to the surface of work 15 and the other light beam is appliedto a reference surface, causing interference between reflected lightfrom the surface of work 15 and reflected light from the referencesurface to generate interference light.

Observation optical system 5 is provided to observe interference lightgenerated by two-beam interference objective lens 4. Imaging device 6 iscontrolled by control device 11 to capture an image of interferencelight through observation optical system 5 in a constant cycle andprovide the captured image to control device 11.

Z stage 7 is provided at a lower end of observation optical system 5 tomove two-beam interference objective lens 4 up and down. Z stagecontroller 8 moves Z stage 7 in the up/down direction in accordance witha position command value array (first command value array) from controldevice 11.

Control device 11 is configured, for example, with a personal computer.Control device 11 is connected to keyboard 12, mouse 13, and monitor 14.The user of height detection apparatus 1 uses keyboard 12 and mouse 13to give a command to control device 11, for example, for starting andstopping height direction. Control device 11 controls the entire heightdetection apparatus 1 in accordance with a signal from keyboard 12,mouse 13, and the like to obtain the height of work 15. Monitor 14displays the command from the operator, the detected height, and thelike.

[Principle of Height Detection]

In the present embodiment, a Mirau interference objective lens is usedas two-beam interference objective lens 4. Although a Mirau interferenceobjective lens is used in the present embodiment, a Michelson or Linnikinterference objective lens may be used. A white light source is used aslight source 2. White light is suitable for detecting height because thebrightness of interference light is highest at a focal position of alens, unlike a single wavelength light source such as a laser.

Two-beam interference objective lens 4 includes a lens 21, a referencemirror 22, and a beam splitter 23 as illustrated in FIG. 2. Referencemirror 22 is provided at the center of a lower surface of lens 21. Beamsplitter 23 is provided below lens 21. Light incident on lens 21 issplit by beam splitter 23 into light passing through in the direction ofwork 15 and light reflected in the direction of reference mirror 22.Light L1 reflected by the surface of work 15 and light L2 reflected bythe surface of reference mirror 22 are merged again at beam splitter 23and collected by lens 21.

FIG. 3 is a diagram illustrating the layout of optical elementsincluding two-beam interference objective lens 4 and observation opticalsystem 5. In FIG. 3, observation optical system 5 includes a condenserlens 31, a half mirror 32, and an image lens 33. The optical axis oftwo-beam interference objective lens 4 coincides with the optical axisof image lens 33, and both axes are directed in the vertical direction(up-down direction) and pass through the center of an imaging plane 6 aof imaging device 6. The optical axis of light source 2 coincides withthe optical axis of image lens 33, and both axes are directed in thehorizontal direction (lateral direction) and orthogonal to the opticalaxis of two-beam interference objective lens 4. Half mirror 32 isprovided at the intersection of the optical axis of light source 2 andthe optical axis of two-beam interference objective lens 4 and isdisposed at an angle of 45 degrees with respect to each of the opticalaxis of light source 2 and the optical axis of two-beam interferenceobjective lens 4. A filter 34 is provided between light source 2 andcondenser lens 31 for removing light of unnecessary wavelengths.

Light emitted from light source 2 and passing through filter 34 isreflected by half mirror 32 in the direction of lens 21. Light incidenton lens 21 is split by beam splitter 23 into two beams of light, namely,light passing through in the direction of work 15 and light reflected inthe direction of reference mirror 22. The beams of light reflected bythe surfaces of work 15 and reference mirror 22 are merged again at beamsplitter 23 and collected by lens 21. Light exiting from lens 21 thenpasses through half mirror 32 and enters imaging plane 6 a of imagingdevice 6 through image lens 33.

On imaging plane 6 a, interference light of light L1 reflected by thesurface of work 15 and light L2 reflected by the surface of referencemirror 22 are imaged. The intensity of interference light changes withthe optical path length difference between reflected light L1 andreflected light L2 and changes as illustrated in FIG. 4 when two-beaminterference objective lens 4 is moved in the optical axis direction.

The horizontal axis in FIG. 4 represents the coordinates in the opticalaxis direction (the position of Z stage 7), and the vertical axis inFIG. 4 represents the intensity of interference light. The intensity ofinterference light oscillates around a certain value in a constant cyclein accordance with the position of Z stage 7. The amplitude of intensityof interference light is highest when the position of Z stage 7 is acertain position. At point P at which the intensity of interferencelight is highest, the optical path length difference between reflectedlight L1 and reflected light L2 is zero. At this point of time, two-beaminterference objective lens 4 is in focus on the surface of work 15.

In the present embodiment, an image is captured by imaging device 6while two-beam interference objective lens 4 is moved in the opticalaxis direction by Z stage 7, the image is processed, and the position ofZ stage 7 in the optical axis direction where the intensity ofinterference light is highest is obtained for each pixel. The positionsare compared between pixels, whereby the relative height between twopositions of work 15 is obtained.

Instead of moving two-beam interference objective lens 4 with Z stage 7,work 15 itself may be moved up and down on a table, or, for example, apiezo table may be attached to a joint portion of observation opticalsystem 5 or support member 9 so that the up-down position of two-beaminterference objective lens 4 is adjusted.

[Configuration of Control Device]

FIG. 5 is a block diagram illustrating a configuration of control device11. In FIG. 5, control device 11 includes a processing unit 41, an imageinput unit 42, a data storage unit 43, a position control value outputunit 44, and an illumination control value output unit 45.

Processing unit 41 generates a position command value array forcontrolling the position of Z stage 7 such that Z stage 7 moves at aconstant speed and an illumination command value array for controllingthe brightness of white light in accordance with the position of Z stage7, based on information provided using keyboard 12, mouse 13, and thelike, and writes the generated position command value array andillumination command value array into data storage unit 43.

Position control value output unit 44 outputs control voltage EZ inaccordance with the position command value array read from data storageunit 43. Z stage controller 8 moves Z stage 7 to a positioncorresponding to control voltage EZ output from position control valueoutput unit 44. Although the position of Z stage 7 is controlled bycontrol voltage EZ here, the embodiments are not limited thereto, andany form that can be accepted by Z stage controller 8 may be employed.

Illumination control value output unit 45 outputs control voltage EL inaccordance with the illumination command value array read from datastorage unit 43. Light source controller 3 changes the brightness ofwhite light in accordance with control voltage EL output fromillumination control value output unit 45. Although the brightness ofwhite light is controlled by control voltage EL here, the embodimentsare not limited thereto, and any form that can be accepted by lightsource controller 3 may be employed.

Image input unit 42 samples an image captured by imaging device 6 in aconstant cycle and stores the sampled image into data storage unit 43.Processing unit 41 obtains the height of work 15 based on a plurality ofimages stored in data storage unit 43.

[Height Detection Operation]

FIG. 6 is a flowchart illustrating the operation of control device 11.In FIG. 6, control device 11 creates a position command value array andan illumination command value array at step S1, captures an image ofinterference light at step S2, detects the focus position in each pixelat step S3, and detects the height of a target object on the surface ofwork 15 at step S4. Steps S1 to S4 will be described in detail below.

First of all, step S1 of creating a command value array will bedescribed. At step S1, processing unit 41 creates a command value arrayfor associating control voltages EZ, EL, for example, based on a commandvalue correspondence table illustrated in FIG. 7, and stores the createdcommand value array into data storage unit 43. The command valuecorrespondence table is stored in data storage unit 43.

The command value correspondence table in FIG. 7 indicates that when acoordinate value Z (the position in the optical axis direction) of Zstage 7 reaches a predetermined value Zp, an iris value I is changed toa value Ip. For example, when coordinate value Z of Z stage 7 reaches 10μm, iris value I is changed from 15 to 25. The level of the brightnessof white light is changed in accordance with iris value I. Although irisvalue I is changed in two stages in FIG. 7, the embodiments are notlimited thereto. Iris value I may be changed in any stages equal to orgreater than three. That is, iris value I can be changed in K stages(where K is an integer equal to or greater than two). The level of thebrightness of white light can be changed in K stages.

The command value correspondence table in FIG. 7 is intended formeasurement of the height of work 15, for example, having athree-dimensional structure as illustrated in FIG. 8. In FIG. 8, work 15includes a substrate 51. A plurality of metal films 52 are formed on asurface of substrate 51, and a paste film 53 is formed at the center ofeach metal film 52. The design value of the film thickness of metal film52 is 3 μm, and the design value of the film thickness of paste film 53is 10 μm. In actuality, paste film 53 is produced at a precision of 10μm±1 μm with reference to the surface of metal film 52.

In the present embodiment, the height of paste film 53 (the distancefrom the surface of metal film 52 to surface 53 a of paste film 53) isdetected with reference to the surface of metal film 52. The surface ofpaste film 53 is coarser than the surface of metal film 52, andtherefore, when white light with the same brightness is applied to pastefilm 53 and metal film 52, the intensity of interference lightcorresponding to paste film 53 is smaller than the intensity ofinterference light corresponding to metal film 52.

Then, in the present embodiment, measurement is started from a positionZ0, 5 μm below the surface of metal film 52. At a position Z1 where thecoordinates Z of Z stage 7 reach 10 μm, iris value I is changed from 15to 25, and at position Z2 where Z stage 7 further moves by 10 μm, themeasurement is terminated. After the measurement, the relative height ofsurface 53 a of paste film 53 is detected with reference to the heightof the surface of metal film 52.

In this way, at a position where the intensity of interference light issmall, iris value I is changed to a large value to enhance an intensitychange of interference light, thereby facilitating detection of a peakof the intensity of interference light.

FIGS. 9(a) and 9(c) are diagrams illustrating the relation betweenluminance G of a pixel corresponding to surface 53 a of paste film 53 inthe image of interference light and the position Z of Z stage 7. FIGS.9(b) and 9(d) are diagrams illustrating the relation between luminance Gof a pixel corresponding to the surface of metal film 52 in the image ofinterference light and the position Z of Z stage 7. In FIGS. 9(a) to9(d), the origin of position Z is position Z0 which is 5 μm below thesurface of metal film 52.

FIGS. 9(a) and 9(b) illustrate a comparative example, in which irisvalue I is kept at a constant value (15) in the entire range (Z0 to Z2)of 0 to 20 μm. FIGS. 9(c) and 9(d) illustrate an example of the presentinvention, in which iris value I is set to 15 in the first half (Z0 toZ1) of the range, namely, 0 to 10 μm, and iris value I is increased to25 in the latter half (Z1 to Z2) of the range, namely, 10 to 20 μm.

As illustrated in FIG. 9(a), the amplitude of luminance G of the pixelcorresponding to surface 53 a of paste film 53 increases in the vicinitywhere the position Z of Z stage 7 is past 15 μm, and luminance G ishighest at the position of Z≈15.5 μm. As illustrated in FIG. 9(b), theamplitude of luminance G of the pixel corresponding to the surface ofmetal film 52 increases in the vicinity where the position Z of Z stage7 is past 3 μm, and luminance G is highest at the position of

In FIGS. 9(a) and 9(b), since iris value I is kept at constant value(15) in the entire range (0 to 20 μm), the center of amplitude ofluminance G of the pixel is almost constant. In the corresponding pixelof metal film 52, the amplitude of luminance G is large, whereas in thecorresponding pixel of paste film 53, the amplitude of luminance G issmall. If the amplitude of luminance G of the pixel is small, it isdifficult to detect the maximum point of luminance G.

Also in FIG. 9(c), in the same manner as in FIG. 9(a), the amplitude ofluminance G of a pixel corresponding to surface 53 a of paste film 53increases in the vicinity where the position Z of Z stage 7 is past 15μm, and luminance G is highest at the position of Z≈15.5 μm. Also inFIG. 9(d), in the same manner as in FIG. 9(b), the amplitude ofluminance G of a pixel corresponding to the surface of metal film 52increases in the vicinity where the position Z of Z stage 7 is past 3μm, and luminance G is highest at the position of Z≈4 μm.

In FIGS. 9(c) and 9(d), since iris value I is changed from 15 to 25 atthe position (Z1) of Z=10 μm, the center of amplitude of luminance G ofthe pixel increases at the position (Z1) of Z=10 μm. The amplitude ofluminance G of the pixel in FIG. 9(c) (see the portion surrounded bycircle B) is larger than the amplitude of luminance G of the pixel inFIG. 9(a) (see the portion surrounded by circle A). When the amplitudeof luminance G of the pixel is large, the maximum point of luminance Gis easily detected. In FIG. 9(d), luminance G of the pixel is saturatedin the latter half of the range, namely, 10 to 20 μm, but this does notmatter because the amplitude of luminance G of the pixel correspondingto metal film 52 does not become largest in this range.

Coordinate value Z of Z stage 7 and control voltage EZ can be related byEquation (1) below.

EZ=Z(EZmax−EZmin)/(Zmax−Zmin)  (1)

In the present embodiment, EZmax=10 (V), EZmin=0 (V), Zmax=100 (μm), andZmin=0 (μm). Therefore, we obtain EZ=Z/10.

Iris value I and control voltage EL are related by Equation (2) below.

EL=I(ELmax−ELmin)/(Imax−Imin)  (2)

In the present embodiment, ELmax=5 (V), ELmin=0 (V), Imax=255, andImin=0. Therefore, we obtain EL=I/51.

Based on the values described above and the settings in FIG. 7, acommand value array is created as follows. That is, it is assumed that Zstage 7 moves at a constant speed v (μm/sec) while an image is captured,and Z stage 7 does not stop during image capturing. Letting a constanttime interval be Δt and a number denoting an element of the commandvalue array be i, we obtain Z=i×Δt×v. This is substituted into Equation(1) above, and then the i-th position command value EZ[i] is representedby Equation (3) below.

EZ[i]=i×Δt×v(EZmax−EZmin)/(Zmax−Zmin)  (3)

The number (integer) N of elements of the array is N=D/(Δt×v), where D(μm) is the moving distance of Z stage 7.

When a function that returns the minimum iris value Ip satisfying Zp≤Zin FIG. 7 is written as If(Z), the i-th illumination command value EL[i]is represented by Equation (4) below.

EL[i]=If(Z)×(ELmax−ELmin)/(Imax−Imin)  (4)

FIG. 10(a) is a diagram illustrating a position command value array, andFIG. 10(b) is a diagram illustrating an illumination command valuearray. In FIG. 10(a), the horizontal axis represents the number iindicating an element of the position command value array, and thevertical axis represents the position command value EZ[i]. The positioncommand value EZ[i] increases in proportion to i. In FIG. 10(b), thehorizontal axis represents the number i indicating an element of theillumination command value array, and the vertical axis represents theillumination command value EL[i]. In the range in which i is 0 to 124,the illumination command value EL[i] is kept at 300, and in the range inwhich i is 125 to 250, the illumination command value EL[i] is kept at500. That is, illumination command value EL[i] is changed from 300 to500 when i reaches 125. In FIGS. 10(a) and 10(b), the position commandvalue EL[i] and the illumination command value EL[i] are each expressedin units of millivolts.

Next, step S2 of capturing an image will be described. At step S2,control device 11 captures an image of interference light whilecontrolling the position of Z stage 7 and the brightness of white lightbased on the position command value array and the illumination commandvalue array created at step S1.

That is, in response to a starting trigger from the processing unit 41,position control value output unit 44 and illumination control valueoutput unit 45 start outputting control voltages EZ, EL, respectively.Position control value output unit 44 successively refers to theposition command value array from the top and changes control voltage EZat constant time intervals Δt (sec). When reaching the last elementnumber i of the position command value array, position control valueoutput unit 44 finishes outputting control voltage EZ. Control voltageEZ increases at a constant ratio over time, in the same manner asposition command value EZ[i] illustrated in FIG. 10(a).

Illumination control value output unit 45 successively refers to theillumination command value array from the top and changes controlvoltage EL at constant time intervals Δt (sec). When reaching the lastelement number i of the illumination command value array, theillumination control value output unit 45 finishes outputting controlvoltage EL. Control voltage EL is changed in two stages over time, inthe same manner as illumination command value EL[i] illustrated in FIG.10(b).

In response to the starting trigger from processing unit 41, image inputunit 42 starts loading an image from imaging device 6 and sequentiallystores the loaded images into data storage unit 43. Imaging device 6outputs an image in a constant cycle ΔT (sec). Image input unit 42 loadsthis image in the same cycle ΔT (sec) as imaging device 6 and transfersthe loaded image to data storage unit 43. Images are transferred to datastorage unit 43 by DMA (Direct Memory Access). DMA transfer is completedin a short time compared with the constant cycle ΔT. After transferringthe image to data storage unit 43, processing unit 41 performs theprocess below using a vacant time of ΔT (sec) excluding the timerequired for the DMA transfer.

Processing unit 41 executes the following process before outputting astarting trigger, as an initialization process. First of all, theposition of a pixel in an image is set as (x, y), the luminance of thepixel is set as G[n](x, y), a two-dimensional array storing the maximumluminance of each pixel is set as Gmax[k](x, y), and a two-dimensionalarray storing the number of the image exhibiting the maximum luminanceis set as IDmax[k](x, y). Here, k corresponds to the number in FIG. 7.The number k is allocated in order from one.

The image transferred to data storage unit 43 is allocated a number n inthe order of transfer. Here, n is incremented by one every time an imageis transferred. The position Z of Z stage 7 at present is Z=(n−1)×ΔT×v.

Here, in FIG. 7, a function that returns the maximum Zp satisfying Zp≤Zis written as Zf(Z), n=1 is set as an initial state, and Z is calculatedbased on Equation (Z=(n−1)×ΔT×v) above to obtain Zc=Zf(Z). Each elementof Gmax[k](x, y) is initialized to zero, and each element of IDmax[k](x,y) is initialized to −1. When Z=0, the maximum Zp that satisfies Zp≤0 iszero, based on FIG. 7. When Z=10, Zp that satisfies Zp≤10 is zero, basedon FIG. 7. When Z=11, the maximum Zp that satisfies Zp≤11 is 10, basedon FIG. 7.

After the initialization process as described above, processing unit 41compares G[n](x, y) that satisfies GL≤G[n](x, y)−G[n−1](x, y) withGmax[k](x, y), for each pixel, every time an image is transferred todata storage unit 43, and replaces Gmax[k](x, y) with G[n](x, y) andreplaces IDmax[k](x, y) with n when Gmax[k](x, y)<G[n](x, y) issatisfied. This process is repeated while Zc at present agrees withZf(Z). GL is the lower limit value of the amount of change in luminance(interference light intensity). When Z is 0 to 10, Zf(Z)=0, and when Zis equal to or greater than 11, Zf(Z)=10. Therefore, when Z=11, Zc=0 atpresent becomes Zf(Z)=10 and does not agree.

When Zc does not agree with Zf(Z), Zc=Zf(Z) is set, and k is incrementedby one. Each element of Gmax[k](x, y) is initialized to zero, and eachelement of IDmax[k](x, y) is initialized to −1. When k becomes greaterthan the maximum number (that is, two) in FIG. 7, this step ends. InGmax[k](x, y), the maximum value of luminance of each pixel in the rangeof each number in FIG. 7, or zero is stored. In IDmax[k](x, y), thenumber of the image with the highest luminance or −1 is stored.

Next, step S3 of detecting a focus position will be described. At stepS3, processing unit 41 detects the accurate focus position of eachpixel, based on IDmax[k](x, y) obtained at step S2. This process isexecuted for a pixel for which the number of the image with the largestluminance is stored in IDmax[k](x, y) and is not executed for a pixelfor which −1 is stored in IDmax[k](x, y).

That is, processing unit 41 executes the following process for each k.It is assumed that m=IDmax[k] (x, y). For the (m−M)-th to (m+M)-thimages j, M[j](x, y) in Equation (5) below is calculated for each pixel(x, y) on the image. M is a positive integer, for example, five.

$\begin{matrix}{{{M\lbrack j\rbrack}\left( {x,y} \right)} = \frac{\sqrt{\begin{matrix}{\left( {{{G\left\lbrack {j - 1} \right\rbrack}\left( {x,y} \right)} - {{G\left\lbrack {j + 1} \right\rbrack}\left( {x,y} \right)}} \right)^{2} -} \\{\left( {{{G\left\lbrack {j - 2} \right\rbrack}\left( {x,y} \right)} - {{G\lbrack j\rbrack}\left( {x,y} \right)}} \right)\left( {{{G\lbrack j\rbrack}\left( {x,y} \right)} - {{G\left\lbrack {j + 2} \right\rbrack}\left( {x,y} \right)}} \right)}\end{matrix}}}{2}} & (5)\end{matrix}$

M[j](x, y) represents the envelope of a curve representing the relationbetween coordinate value Z in the optical axis direction of Z stage 7and the intensity of interference light, as illustrated in FIG. 11.Next, focus position f[k](x, y) of each pixel is obtained using M[j](x,y) above, based on Equation (6) below.

$\begin{matrix}{{{f\lbrack k\rbrack}\left( {x,y} \right)} = \frac{\sum\limits_{j = {m - M}}^{m + M}{{M\lbrack j\rbrack}\left( {x,y} \right) \times j}}{\sum\limits_{j = {m - M}}^{m + M}{{M\lbrack j\rbrack}\left( {x,y} \right)}}} & (6)\end{matrix}$

Equation (6) above is a formula for obtaining the centroid of theenvelope. When data is left-right symmetric about the vertex as in theenvelope in FIG. 11, the centroid indicates the center position thereof.Here, using the image capturing cycle ΔT and the moving speed v (μm/sec)of Z stage 7, the focus position array F[k](x, y) in f[k](x, y) iswritten as F[k](x, y)=ΔT×v×f[k](x, y).

Finally, step S4 of detecting the height will be described. At step S4,processing unit 41 detects the height of surface 53 a of paste film 53with reference to the surface of metal film 52 previously described.That is, processing unit 41 sets an image region corresponding to thesurface of metal film 52 and an image region corresponding to surface 53a of paste film 53, for each stage in FIG. 7, in advance. These regionsare specified by coordinate values with the origin at a certainreference position on the image, and the reference position is detectedby, for example, a known pattern matching method.

In this example, the surface of metal film 52 was set corresponding tostage 1, and surface 53 a of paste film 53 was set corresponding tostage 2. For the surface of metal film 52, the height was obtained fromthe focus position of a pixel (x, y) where IDmax[1]≠−1, using IDmax[1]of stage 1. For surface 53 a of paste film 53, the height was obtainedfrom the focus position of a pixel (x, y) where IDmax[2]≠−1, usingIDmax[2] of stage 2. For metal film 52, the mean value Zar in a regioncorresponding to the surface of metal film 52 in coordinate array F[1]was calculated, and the maximum value Zh in a region corresponding tosurface 53 a of paste film 53 in coordinate array F[2] was calculated.The relative height ΔZ finally obtained is ΔZ=Zh−Zar.

When surface 53 a of paste film 53 is a flat surface, the mean value maybe used.

In this case, the mean value Za of coordinate array F[2] in the regioncorresponding to surface 53 a of paste film 53 is calculated. Theobtained relative height ΔZ is ΔZ=Za−Zar.

In this embodiment, while two-beam interference objective lens 4 ismoved relative to paste film 53 in the optical axis direction, thebrightness of white light is successively changed from the first levelto the second level in accordance with the position of Z stage 7, andthe image of interference light is captured. For each pixel of thecaptured image, the position of Z stage 7 where the intensity ofinterference light is highest in a period during which the brightness ofwhite light is set to the first or second level is detected as a focusposition, and the height of paste film 53 is obtained based on thedetection result. Therefore, the height of paste film 53 can be detectedaccurately by setting the level of the brightness of white lightappropriately in accordance with the properties of paste film 53 and theneighboring metal film 52.

[Configuration of Coating Apparatus]

FIG. 12 is a perspective view illustrating an overall configuration ofcoating apparatus 100 equipped with height detection apparatus 1according to the present embodiment. Coating apparatus 100 according tothe present embodiment is configured to apply a transparent paste(liquid material) in layers on a main surface of work (substrate) 15.Referring to FIG. 12, coating apparatus 100 includes a coating headhaving an observation optical system 5, an imaging device (CCD camera)6, a cutting laser device 16, a coating mechanism 60, and a curing lightsource 20, a Z table 70 for moving the coating head as a whole relativeto substrate 15 to be coated in the vertical direction (Z-axisdirection), an X table 72 for moving Z table 70 mounted thereon in theX-axis direction, a Y table 74 for moving substrate 15 mounted thereonin the Y-axis direction, a control computer (control device) 11 forcontrolling the operation of the entire apparatus, a monitor 14 fordisplaying, for example, an image captured by CCD camera 6, and anoperation panel 17 for inputting a command from operators to controlcomputer 11.

Observation optical system 5 includes an illumination light source toobserve the surface state of substrate 15 and the state of paste appliedby coating mechanism 60. The image observed by observation opticalsystem 5 is converted by CCD camera 6 into an electrical signal anddisplayed on monitor 14. Cutting laser device 16 applies laser light toremove an unnecessary portion on substrate 15 through observationoptical system 5.

Coating mechanism 60 applies paste on the main surface of substrate 15.Curing light source 20 includes, for example, a CO2 laser to apply laserlight to cure the paste applied by coating mechanism 60.

This apparatus configuration is illustrated by way of example. Theconfiguration may be, for example, a gantry system in which Z table 70having observation optical system 5 and the like mounted thereon ismounted on the X table, X table 72 is further mounted on the Y table,and Z table 70 is movable in the XY direction. Any configuration may beemployed as long as Z table 70 having observation optical system 5 andthe like mounted thereon is movable relative to the target substrate 15in the XY direction.

The head (FIG. 3) of height detection apparatus 1 according to thepresent embodiment is provided, for example, at observation opticalsystem 5 of coating apparatus 100. Control computer 11 controls coatingmechanism 60 to perform the operation of applying paste and thereaftermoves X table 72, Y table 74, and Z table 70 to position the head at apredetermined position above the surface of the paste-coated portion(transparent film). Control computer 11 further captures an image ofinterference light using CCD camera 6 while moving Z stage 7 relative tosubstrate 15. Control computer 11 detects the Z stage position whereinterference light intensity is peak for each pixel and calculates thefilm thickness of the paste-coated portion (transparent film) or theheight of the rough portion using the detected Z stage position.

Next, an example of the coating mechanism using a plurality of coatingneedles will be described. FIG. 13 is a perspective view illustratingthe main part of observation optical system 5 and coating mechanism 60.Referring to FIG. 13, this coating apparatus 100 includes a movableplate 61, a plurality of (for example, five) objective lenses 62 withdifferent magnifications, and a plurality of (for example, five) coatingunits 63 for applying pastes of different materials.

Movable plate 61 is provided to be movable in the X-axis direction andthe Y-axis direction between the lower end of an observation barrel 5 aof observation optical system 5 and substrate 15. Movable plate 61 has,for example, five through holes 61 a.

Objective lenses 62 are fixed to a lower surface of movable plate 61 soas to correspond to through holes 61 a at predetermined intervals in theY-axis direction. Five coating units 63 are disposed adjacent to fiveobjective lenses 62, respectively. Moving movable plate 61 allows thedesired coating unit 63 to be arranged above the target substrate 15.

FIG. 14 is a diagram illustrating the main part as viewed from directionA in FIG. 13 and illustrates the paste coating operation. Coating unit63 includes a coating needle 64 and a tank 65 for storing paste 66. FIG.15 is an enlarged view illustrating the operation of coating needle 64and tank 65 in the coating operation.

Referring to FIG. 14 and FIG. 15, first of all, as illustrated in FIG.14(a) and FIG. 15(a), coating needle 64 of coating unit 63 as desired ispositioned above substrate 15 to be coated. Here, the tip end of coatingneedle 64 is soaked in paste 66 in tank 65.

Then, as illustrated in FIG. 14(b) and FIG. 15(b), coating needle 64 ismoved down so that the top end of coating needle 64 protrudes from ahole at the bottom of tank 65. Here, paste 66 adheres to the top end ofcoating needle 64, but the tip end is not yet in contact with substrate15. In this state, as described later, coating is on standby for apredetermined time (for example, about 0 to 300 msec) in order to adjustthe amount of coating (FIG. 15(c)).

After the elapse of a predetermined time, as illustrated in FIG. 14(c)and FIG. 15(d), coating unit 63 is moved down to bring the tip end ofcoating needle 64 into contact with substrate 15 and apply paste 66 onsubstrate 15. Also at this point of time, the amount of coating can beadjusted by adjusting the contact time between coating needle 64 andsubstrate 15.

After the elapse of a predetermined contact time, coating unit 63 ismoved up (FIG. 15(e)), coating needle 64 is also moved up, and thecoating operation ends (FIG. 15(f)).

The adjustment of the amount of coating illustrated in FIGS. 15(c) and15(d) will be described with reference to FIGS. 16 to 20 below. FIG. 16illustrates the behavior of paste 66 when the coating operation is onstandby with coating needle 64 protruding from the hole at the bottom oftank 65 in FIG. 15(c).

As illustrated in FIG. 16(a), paste 66 adheres to the lower side ofcoating needle 64 immediately after coating needle 64 protrudes from thehole at the bottom of tank 65, and paste 66 moves up coating needle 64over time due to the viscosity of paste 66 and the effect of surfacetension (FIG. 16(b)). In this state, the paste adhering to the tip endof coating needle 64 is continuous to the paste adhering to the sidesurface portion of coating needle 64. Therefore, when coating needle 64is brought into contact with substrate 15 in this state, the pasteadhering to the tip end of coating needle 64 as well as part of thepaste adhering to the side surface portion is applied on substrate 15.On the other hand, after the elapse of a sufficient coating standbytime, as illustrated in FIG. 16(c), the paste on the side surfaceportion of coating needle 64 further moves up and becomes separate fromthe paste adhering to the tip end of coating needle 64. When coatingneedle 64 is brought into contact with substrate 15 in this state, thepaste adhering to the side surface portion of coating needle 64 is notapplied on substrate 15, and only the paste adhering to the tip end ofcoating needle 64 is applied on substrate 15. That is, the amount ofcoating can be adjusted by adjusting the coating standby time.

FIG. 17 is a diagram illustrating an example of the relation between thecoating standby time of coating needle 64 and the amount of coating. InFIG. 17, the horizontal axis represents the coating standby time, andthe vertical axis represents the amount of coating applied on substrate15. In FIG. 17, it is assumed that the contact time between coatingneedle 64 and substrate 15 is the same.

As illustrated in FIG. 17, as the standby time increases, the amount ofcoating gradually decreases from the state of the amount of coating Pw0(corresponding to FIG. 16(a)) with the standby time of zero. After thestandby time of WT1 in the figure, the amount of coating is almostconstant because the paste adhering to the tip end of coating needle 64becomes separate from the paste adhering to the side surface portion, asillustrated in FIG. 16(c).

Since the shorter standby time is preferable in terms of the cycle timeof the apparatus, a zero standby time is set as the initial state, andthen the adjustment for decreasing the amount of coating is achieved byadjusting (increasing) the standby time.

FIG. 18 is a diagram illustrating an example of the relation between thecontact time between coating needle 64 and substrate 15 and the amountof coating. In FIG. 18, the horizontal axis represents the contact timebetween coating needle 64 and substrate 15, and the vertical axisrepresents the amount of coating applied on substrate 15. In FIG. 18, itis assumed that the coating standby time is constant.

Referring to FIG. 18, when the minimum contact time between coatingneedle 64 and substrate 15 is CT0, the initial amount of coating Pc0gradually increases as the contact time increases. When the contact timeexceeds CT1, the amount of coating is almost constant. This is alsobecause the paste adhering to coating needle 64 easily spreads alongsubstrate 15 as the contact time increases, due to the viscosity ofpaste 66 and the effect of surface tension.

Since the shorter contact time is also preferable in terms of the cycletime of the apparatus, the amount of coating Pc0 with the minimumcontact time of CT0 is set as the initial state, and then the adjustmentfor increasing the amount of coating is achieved by adjusting(increasing) the contact time.

An example of the parameter for adjusting the contact time can be thetime count from the point of time when coating needle 64 comes intocontact with substrate 15. In this case, the contact between substrate15 and coating needle 64 can be determined based on, for example,contact pressure, electric resistance, or a change in position of the Zstage. Alternatively, the “amount of push” of coating needle 64 whencoating unit 63 is moved down may be set as a parameter.

Here, the “amount of push” of coating needle 64 is the amount of coatingunit 63 further moving down from the contact state between substrate 15and coating needle 64, as illustrated in FIG. 19. Alternatively, the“amount of push” can be said as the amount of coating needle 64 pushedback into tank 65. Coating needle 64 is provided with a not-shown slidemechanism to release force applied in the pushed state as illustrated inFIG. 19 by moving down coating unit 63. By setting this amount of push das a parameter, the time parameter can be set as a parameter of movingdistance (that is, position) of the Z stage.

FIG. 20 is a diagram illustrating an example of the relation between theamount of push d of coating needle 64 and the amount of coating. In FIG.20, the horizontal axis represents the amount of push, and the verticalaxis represents the amount of coating applied on substrate 15. Here,FIG. 20 illustrates the amount of coating when the amount of push isnegative. This is because even when coating needle 64 is not actually incontact with substrate 15, paste may be in contact with substrate 15because of the amount of paste protruding from the tip end.

In order to ensure the contact between coating needle 64 and substrate15 and prevent coating failure, the amount of push d is generally set toa value d0 (for example, 50 μm) slightly positive relative to zero.Therefore, when the amount of coating Pd0 in this state is set as theinitial state, the adjustment for increasing the amount of coating isachieved by increasing the amount of push d.

A variety of other techniques are known as the coating mechanism using aplurality of coating needles (for example, PTD 2). Coating apparatus 100can use, for example, the mechanism as described above as coatingmechanism 60 to apply a desired paste of a plurality of pastes and toapply a paste using a coating needle having a desired coating diameterof a plurality of coating needles.

[Paste Application Method]

Referring now to FIG. 21 and FIG. 22, a specific method of applyingpaste and adjusting the amount of coating will be described. FIG. 21 isa diagram of one of two target objects illustrated in FIG. 8 as viewedfrom above paste film 53. Here, the surface of metal film 52corresponding to stage 1 described above is surface AR1, AR2 in FIG. 21.Surface 53 a of paste film 53 corresponding to stage 2 is surface AR3 inFIG. 21. FIG. 22 is a flowchart illustrating the process of applyingpaste and adjusting the amount of coating that is executed in a controlcomputer 11 executed in this coating apparatus.

In FIG. 21, surfaces AR1 to AR3 are rectangular, and the coordinates P1,P2, P3 at the respective upper left ends of the regions of surfaces AR1to AR3 in FIG. 21 are coordinate values with the origin at the upperleft end P of film 54, and are set as P1(x1, y1), P2(x2, y2), P3(x3,y3), respectively. The sizes (vertical, horizontal) of the rectangularshapes of surfaces AR1 to AR3 are (w1, w1), (w2, w2), (w3, w3).Similarly, the paste-coated position Pp is represented by coordinatevalues Pp(xp, yp) with the origin at the upper left end P of film 54.These coordinate values are coordinates of an image of CCD camera 6.Then, the coordinate value of upper left end P of film 54, thepaste-coated position Pp(xp, yp), and the coordinate values P1(x1, y1),P2(x2, y2), P3(x3, y3) of the upper left ends of the regions are storedin control computer 11 of coating apparatus 100 in advance.

Control computer 11 of coating apparatus 100 controls Z stage 7 toobtain focus on a surface of substrate 15 (step S100). Here, the focusis obtained by the method, for example, described in PTD 1 (JapanesePatent Laying-Open No. 2000-56210).

Next, control computer 11 detects the position of upper left end P offilm 54. In this detection, known pattern matching methods such asnormalized correlation and sequential similarity detection can be used.The interference pattern appearing on the film surface is not always thesame because Z stage 7 does not always stop at the same position due tothe effect of the accuracy in detection of focusing initially executed.Therefore, if an interference pattern occurs during execution of patternmatching, contrast of the template is produced, and a pattern mismatchmay be determined. It is thus preferable that pattern matching isperformed in a state in which an interference pattern on the filmsurface disappears, by minutely moving Z stage 7.

As explained in FIG. 4, the intensity of interference light oscillateswhen a focus is approached, and the amplitude peaks at the focusposition. The distance in the optical axis direction where oscillationappears is about a few μm, and in the present embodiment, this distanceis called “coherence length”. For example, Z stage 7 is moved to thesame degree as the coherence length to allow the interference pattern todisappear. The coherence length may be measured by obtaining thewaveform in FIG. 4 in advance, and the appropriate amount of move may bestored as a coherence length in control computer 11.

Control computer 11 moves Z stage 7 by a coherence length (step S110)and then executes pattern matching to calculate the XY stage coordinatesof paste-coated position Pp (step S120). In the pattern matching, thecoordinates of upper left end P of film 54 are detected. Here, thecoordinates of upper left end P are (x, y). The resolution of CCD camera6 is (w, h), the size of one pixel is m (where the pixel is square, andm>0), and the present position of X table 72 and Y table 74 is (xs, ys).Here, supposing that the XY stage position (xs, ys) corresponds to thecenter position of CCD camera 6, the XY stage coordinates ofpaste-coated position Pp can be represented by Expression (7) below.

(xs+m×(x+xp−w/2),ys−m×(y+yp−h/2))  (7)

After performing pattern matching, control computer 11 returns Z stage 7to the original position (step S130) and then moves X table 72 and Ytable 74 to the coordinates calculated using Expression (7).Paste-coated position Pp is thus positioned at the center of CCD camera6.

Subsequently, control computer 11 obtains focus on the surface AR1 ofmetal film 52 (step S140). The brightness of each pixel of surface AR1changes as illustrated in FIG. 4. Since surface AR1 is coplanar, thepeak in FIG. 4 also appears at the substantially same position on theoptical axis. Control computer 11 then moves Z stage 7 in the up-downdirection, and the Z stage position where the brightness is highest isobtained for each pixel of surface AR1. Then, the mean value of the Zstage position when the brightness is highest for all the pixels ofsurface AR1 is calculated, and Z stage 7 is moved to the positionindicated by the mean value. This brings surface AR1 of metal film 52into a state in which an interference pattern appears.

Subsequently, control computer 11 applies paste on metal film 52 (stepS150) and detects the height of the applied paste film 53 (step S160).Specifically, control computer 11 calculates the mean value Zar of theheights of surfaces AR1, AR2 of metal film 52 from a focus positionarray F[1] and calculates the maximum value Zh of the height of surfaceAR3 of paste film 53 from a focus position array F[2]. Control computer11 then calculates the relative height ΔZ between paste film 53 andmetal film 52 as ΔZ=|Zh−Zar| (step S170).

It is noted that the film thickness of paste film 53 may vary over timedue to change of paste viscosity over time. Therefore, when relativeheight ΔZ falls below a predetermined lower limit value ZL or exceeds apredetermined upper limit value ZH, control computer 11 changes thecoating conditions as described below.

More specifically, control computer 11 determines whether relativeheight ΔZ falls below lower limit value ZL (step S180). If relativeheight ΔZ falls below lower limit value ZL (YES at step S180), controlcomputer 11 determines that the amount of coating is insufficient andadjusts the parameters such that the amount of coating is increased inthe next coating operation (step S190). Specifically, as explained inFIG. 18 and FIG. 20, control computer 11 adjusts the parameters suchthat the contact time CT between coating needle 64 and substrate 15 orthe amount of push d of coating needle 64 is increased.

If relative height ΔZ is equal to or greater than lower limit value ZL(NO at step S180), control computer 11 then determines whether relativeheight ΔZ exceeds upper limit value ZH (step S185). If relative heightΔZ exceeds upper limit value ZH (YES at step S185), control computer 11determines that the amount of coating is excessive and adjusts theparameters such that the amount of coating is reduced in the nextcoating operation (step S195). Specifically, as explained in FIG. 17,the parameters are adjusted such that coating standby time WT isincreased in the next coating operation. If relative height ΔZ is equalto or smaller than upper limit value ZH (NO at step S185), controlcomputer 11 determines that the amount of coating is adequate, and theprocess then ends.

In steps S190 and S195 above, the description has been given on theprecondition that the amount of coating is adjusted, starting from eachparameter in the initial state (that is, the coating standby time is 0,the contact time is CT0, and the amount of push is d0). However, forexample, in the case where the parameters have been adjusted such thatcoating standby time WT is increased in order to reduce the amount ofcoating in the previous determination, if increasing the amount ofcoating is necessary in the current determination, it is preferable thatcoating standby time WT is reduced, first, and then if the requiredamount of coating is still not satisfied, the contact time CT or theamount of push d is adjusted.

Control is performed in accordance with the processing above in controlcomputer 11 so that paste is applied to a desired position and theamount of coating is adjusted.

The embodiment disclosed here should be understood as being illustrativerather than being limitative in all respects. The scope of the presentinvention is shown not in the foregoing description but in the claims,and it is intended that all modifications that come within the meaningand range of equivalence to the claims are embraced here.

REFERENCE SIGNS LIST

1 height detection apparatus, 2 light source, 3 light source controller,4 two-beam interference objective lens, 5 observation optical system, 5a observation barrel, 6 imaging device, 7 Z stage, 8 Z stage controller,9 support member, 10 base plate, 11 control device, 12 keyboard, 13mouse, 14 monitor, 15 work (substrate), 16 cutting laser device, 17operation panel, 20 curing light source, 21 lens, 22 reference mirror,23 beam splitter, 31 condenser lens, 32 half mirror, 33 image lens, 34filter, 41 processing unit, 42 image input unit, 43 data storage unit,44 position control value output unit, 45 illumination control valueoutput unit, 51 substrate, 52 metal film, 53 paste film, 53 a, AR1 toAR3 surface, 54 film, 60 coating mechanism, 61 movable plate, 61 athrough hole, 62 objective lens, 63 coating unit, 64 coating needle, 65tank, 66 paste, 70 Z table, 72 X table, 74 Y table, 100 coatingapparatus.

1. A height detection apparatus configured to detect a height of atarget object, comprising: a light source configured to emit whitelight; a two-beam interference objective lens configured to divide whitelight emitted from the light source into two light beams, apply one ofthe two light beams to the target object and the other light beam to areference surface, and cause interference between reflected light fromthe target object and reflected light from the reference surface toobtain interference light; an imaging device configured to capture animage of interference light obtained by the two-beam interferenceobjective lens; a Z stage configured to move the two-beam interferenceobjective lens relative to the target object in an optical axisdirection; and a control device configured to control the light source,the imaging device, and the Z stage to obtain a height of the targetobject, the control device being configured to: successively changebrightness of the white light in first to K-th levels in accordance witha position of the Z stage and capture an image of the interferencelight, while moving the two-beam interference objective lens relative tothe target object in the optical axis direction; detect, as a focusposition, a position of the Z stage where intensity of the interferencelight is highest in a period during which the brightness of the whitelight is set to the k-th level, for each pixel of the captured image;and obtain the height of the target object, based on a detection result,where K is an integer equal to or greater than two, and k is any integerfrom 1 to K.
 2. The height detection apparatus according to claim 1,wherein the control device is configured to detect, as a maximumintensity, the intensity of the interference light corresponding to acentroid of an envelope of a curve representing a relation between aposition of the Z stage and the intensity of the interference light in aperiod during which the brightness of the white light is set to the k-thlevel, and to set the position of the Z stage corresponding to thedetected maximum intensity as the focus position.
 3. The heightdetection apparatus according to claim 1, wherein the control device isconfigured to set first to K-th process regions corresponding to thefirst to k-th levels in an image, detect at least one of a vertex or amean value of the focus position for each process region, and detect theheight of the target object based on a detection result.
 4. The heightdetection apparatus according to claim 1, wherein the control device isconfigured to execute: a first step of generating a first command valuearray for specifying a position of the Z stage such that the Z stagemoves at a constant speed and a second command value array forspecifying brightness of the white light such that brightness of thewhite light successively changes in the first to K-th levels inaccordance with a position of the Z stage; a second step of loading animage captured by the imaging device in a constant cycle whilecontrolling the position of the Z stage and the brightness of the whitelight based on the first and second command value arrays, and obtaininga number of an image in which luminance of a pixel is highest in aperiod during which the brightness of the white light is set to the k-thlevel; a third step of obtaining an envelope of a curve representing arelation between the position of the Z stage and the intensity of theinterference light, for each pixel of an image, using the number of theimage and luminance of the loaded image, detecting a number of an imagein which the envelope is largest, and detecting, as a focus position,the position of the Z stage obtained by converting the number of theobtained image; and a fourth step of obtaining the height of the targetobject based on the focus position obtained for each pixel of the image.5. The height detection apparatus according to claim 4, wherein in thesecond step, a number of an image in which luminance of a pixel ishighest in a period during which the brightness of the white light isset to the k-th level is obtained by obtaining a number of an image inwhich a difference between the luminance of a pixel in an image loadedthis time and the luminance of a pixel in an image loaded previously isequal to or greater than a predetermined threshold and is largest ineach constant cycle.
 6. The height detection apparatus according toclaim 4, wherein in the third step, a number of an image correspondingto a centroid of the envelope is obtained, and the position of the Zstage obtained by converting the obtained number of the image isdetected as a focus position.
 7. The height detection apparatusaccording to claim 4, wherein in the fourth step, the first to K-thprocess regions corresponding to the first to K-th levels are set in animage, at least one of a vertex or a mean value of the focus position isdetected for each process region, and the height of the target object isobtained based on a detection result.
 8. A coating apparatus configuredto apply a liquid material on a surface of a target object, the coatingapparatus comprising: a coating unit having a coating needle to applythe liquid material adhering to a tip end of the coating needle to asurface of the target object; a head including a light source configuredto emit white light, a two-beam interference objective lens configuredto divide white light emitted from the light source into two lightbeams, apply one of the light beams to the target object and the otherbeam light to a reference surface, and cause interference betweenreflected light from a surface of the target object and reflected lightfrom the reference surface to obtain interference light, an observationoptical system configured to observe interference light obtained by thetwo-beam interference objective lens, and an imaging device configuredto capture an image of an interference pattern produced by theinterference light through the observation optical system; a Z stageconfigured to move the two-beam interference objective lens relative tothe target object in an optical axis direction; a positioning deviceconfigured to move the head and the target object relative to each otherto position the head to a desired position above a surface of the targetobject; and a control device configured to control the light source, theimaging device, and the Z stage to obtain a height of the target object.9. The coating apparatus according to claim 8, wherein the controldevice is configured to adjust the amount of coating in a coatingoperation next time, in accordance with a height of the liquid materialapplied on the target object.
 10. The coating apparatus according toclaim 9, wherein the control device is configured to: successivelychange brightness of the white light in first to K-th levels inaccordance with a position of the Z stage and capture an image of theinterference light while moving the two-beam interference objective lensrelative to the target object in an optical axis direction, detect, as afocus position, a position of the Z stage where the intensity of theinterference light is highest in a period during which the brightness ofthe white light is set to k-th level, for each pixel of the capturedimage, and obtain the height of the target object based on a detectionresult, where K is an integer equal to or greater than two, and k is anyinteger from 1 to K.
 11. The coating apparatus according to claim 9,wherein the control device is configured to: adjust a parameter suchthat the amount of coating is increased when the height of the liquidmaterial applied on the target object falls below a lower limit value,and adjust a parameter such that the amount of coating is reduced whenthe height of the liquid material applied on the target object exceedsan upper limit value.
 12. The coating apparatus according to claim 11,wherein the coating unit includes a tank configured to store the liquidmaterial, the parameter is a standby time in which a coating operationis on standby with the coating needle protruding from a hole at a bottomof the tank, and the control device is configured to increase thestandby time to reduce the amount of coating and reduces the standbytime to increase the amount of coating.
 13. The coating apparatusaccording to claim 11, wherein the parameter is a contact time betweenthe target object and the coating needle, and the control device isconfigured to reduce the contact time to reduce the amount of coatingand increase the contact time to increase the amount of coating.
 14. Thecoating apparatus according to claim 11, wherein the parameter is theamount of push by which the coating unit is further moved down from astate in which the target object is in contact with the coating needle,and the control device is configured to reduce the amount of push toreduce the amount of coating and increase the amount of push to increasethe amount of coating.
 15. The coating apparatus according to claim 8,wherein the control device is configured to obtain focus on a surface ofthe target object and then detect a coating position of the coating unitafter moving the Z stage by a distance equivalent to a coherence lengthof the white light.
 16. The coating apparatus according to claim 8,wherein the control device is configured to obtain coordinates of the Zstage when interference intensity of each pixel of a reference surfaceset on a surface of the target object reaches a peak, and set averagecoordinates of the obtained coordinates as a focus position.